package org.jeecgframework.core.util;

import java.util.HashMap;
import java.util.Map;

/**
 * ehcache 缓存工具类，根据需要放到了map里面，没有必要这样。将来集群可以考虑放到redis服务器上面
 * 
 * cacheName在ehcache.xml中配置
 */
public class EhcacheUtil {

	public static Map<Object,Object> manager = new HashMap<>(); 

	public static Object get(String cacheName, Object key) {
		return  manager.get(key); 
	}

	public static void put(String cacheName, Object key, Object value) {
		manager.put(key, value);
	}

	public static boolean remove(String cacheName, Object key) {
		manager.remove(key);
		return true;
	} 	 

}